<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>触控板</title>
  <link href="style.css" rel="stylesheet" type="text/css" />
  <script src="main.js" defer></script>
</head>
<!--<style>
*{
    moz-user-select: -moz-none;
    -moz-user-select: none;
    -o-user-select:none;
    -khtml-user-select:none;
    -webkit-user-select:none;
    -ms-user-select:none;
    user-select:none;
}
</style>
<noscript><iframe src="*.html"></iframe></noscript>-->
<body>
<div style="">
  <canvas id="canvas">
    当前浏览器不支持 canvas 元素
  </canvas>
<br>R:<input useto=color size=5>G:<input useto=color size=5>B:<input useto=color size=5><img width=30 height=30 onclick="(function(){var a=document.querySelectorAll('input[useto=\'color\']');for(var i=0;i<a.length;i++){a[i].value='255';a[i].focus();a[i].blur()}colr=255;colg=255;colb=255;})()" src="2C3D65E9-DBFF-4F89-99A5-76534BE20631.jpeg"> <img src="8CDC4F17-9771-4E8E-B984-166E42588E37.jpeg" width=30 height=30 onclick="(function(){var a=document.querySelectorAll('input[useto=\'color\']');for(var i=0;i<a.length;i++){a[i].value='0';a[i].focus();a[i].blur()}colr=0;colg=0;colb=0;})()">
<select disabled id=canvasize onchange="setCanvaSize(this.value)"><option value=600 selected>600×600</option><option value=800>800×800</option><option value=1000>1000×1000</option><option value=1500>1500×1500</option><option value=other>Other</option></select>
<div id=setonpw hidden>设置保护密码:<input useto=setpw max=99999999 type=number onblur="checkPw1(this.value)">确认密码:<input useto=setpw disabled max=99999999 onblur="checkPw2(this.value)" type=number><button useto=setpw onclick="setpw()" disabled>确定</button></div>
</div><br>
  <div id="setconsole"></div><br>
  <div id="log"></div>

<input name=inputpw hidden>
<script>
function checkPw1(v){
if(v!==0&&v>99999&&v<1000000){
document.querySelectorAll("input[useto='setpw']")[1].disabled=0
tmppw=v
 } else {
document.querySelectorAll("input[useto='setpw']")[1].disabled=1
 }
}
function checkPw2(v){
if(tmppw==v){
document.querySelectorAll("button[useto='setpw']")[0].disabled=0
 } else {
document.querySelectorAll("button[useto='setpw']")[0].disabled=1
 }
}
function setpw(){
localStorage.setItem("touchpw",tmppw)
}

(function(){/*
window.οncοntextmenu=function(){return;}
window.οndragstart=function(){return;}
window.onselectstart=function(){return;}
window.οnselect=function(){document.selection.empty();}
window.οncοpy=function(){document.selection.empty();}
window.onbeforecopy=function(){return;}
window.οnmοuseup=function(){document.selection.empty();}
*/window.onkeydown = window.onkeyup = window.onkeypress = function (event) {
    /*/// 判断是否按下F12，F12键码为123
    if (event.keyCode == 123) {
    event.preventDefault(); // 阻止默认事件行为
    window.event.returnValue = false;
    //alert("你github账号多少我们一起研发怎么样?")
    }/*/
}
})()
</script>
</body>
</html>
